package _95MingLing;

import _95MingLing.impl.BuyStock;
import _95MingLing.impl.SellStock;

/**
 * @Test: 命令模式测试类
 * @author: ZBoHang
 * @time: 2021/9/16 9:06
 */
class Test {
    public static void main(String[] args) {
        Stock stock = new Stock();

        BuyStock buyStock = new BuyStock(stock);
        SellStock sellStock = new SellStock(stock);

        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(buyStock);
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);

        broker.placeOrder();
    }
}
